package com.pyue.eam.app.api.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import lombok.experimental.FieldNameConstants;

/**
 * 文章资讯
 *
 * @author lucc
 * @date 2023-06-07 16:32:35
 */
@Data
@FieldNameConstants
@TableName("app_article")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "文章资讯")
@Accessors(chain = true)
public class AppArticleEntity extends AppBaseEntity {


    @TableId(type = IdType.ASSIGN_ID)
    private Long id;

    /**
     * 分类
     */
    @Schema(description = "分类")
    private Long cid;

    /**
     * 标题
     */
    @Schema(description = "标题")
    private String title;

    /**
     * 简介
     */
    @Schema(description = "简介")
    private String intro;

    /**
     * 摘要
     */
    @Schema(description = "摘要")
    private String summary;

    /**
     * 封面
     */
    @Schema(description = "封面")
    private String image;

    /**
     * 内容
     */
    @Schema(description = "内容")
    private String content;

    /**
     * 作者
     */
    @Schema(description = "作者")
    private String author;

    /**
     * 浏览
     */
    @Schema(description = "浏览")
    private Integer visit;

    /**
     * 排序
     */
    @Schema(description = "排序")
    private Integer sort;

    /**
     * 当前用户是否已收藏
     */
    @TableField(exist = false)
    private boolean collect;

    /**
     * 分类名称
     */
    @TableField(exist = false)
    private String cname;

}
